import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import { User } from './entry-server';

// @ts-ignore
// 服务端渲染时，注入的数据
const data = window.__SSR_DATA__ as User;

ReactDOM.hydrate(
  <React.StrictMode>
    <App data={data} />
  </React.StrictMode>,
  document.getElementById('root')
);
